package com.aidex.biz.domain;

import com.aidex.common.annotation.Excel;
import com.aidex.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 优惠券信息对象 biz_coupon_info
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-07-02
 */
@Data
public class CouponInfo extends BaseEntity<CouponInfo>
{
    private static final long serialVersionUID = 1L;


    /** 图片 */
    @Excel(name = "图片")
    private String image;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal amount;

    /** 0洗护优惠券 1商城优惠券 */
    private Integer type;

    /** 过期时间 */
   // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date outTime;

    /** 过期时间开始 */

    private String beginOutTime;

    /** 过期时间结束 */

    private String endOutTime;
    /** 发券数量 */
    private Integer counts;

    /** 领取数量 */
    private Integer receiveCounts;

    /** 开始时间 */
  //  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 开始时间开始 */
    private String beginStartTime;

    /** 开始时间结束 */
    private String endStartTime;
    /** 结束时间 */
   // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 结束时间开始 */
    private String beginEndTime;

    /** 结束时间结束 */
    private String endEndTime;
    /** 标题 */
    private String title;

    /** 排序 */
    private Integer sort;
    /** 满减 */
    private Integer fullSub;

    /** 状态（0正常 1 停用） */
    @NotBlank(message = "状态（0正常 1 停用 -1过期）不允许为空")
    private String status;
    /** 用户ID*/
    private String userInfoId;


    public void setImage(String image) 
    {
        this.image = image;
    }

    public String getImage() 
    {
        return image;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }

    public void setOutTime(Date outTime) 
    {
        this.outTime = outTime;
    }

    public Date getOutTime() 
    {
        return outTime;
    }

    public void setCounts(Integer counts) 
    {
        this.counts = counts;
    }

    public Integer getCounts() 
    {
        return counts;
    }

    public void setReceiveCounts(Integer receiveCounts) 
    {
        this.receiveCounts = receiveCounts;
    }

    public Integer getReceiveCounts() 
    {
        return receiveCounts;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setSort(Integer sort) 
    {
        this.sort = sort;
    }

    public Integer getSort() 
    {
        return sort;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("deptId", getDeptId())
            .append("userName", getUserName())
            .append("deptName", getDeptName())
            .append("companyId", getCompanyId())
            .append("image", getImage())
            .append("amount", getAmount())
            .append("type", getType())
            .append("outTime", getOutTime())
            .append("counts", getCounts())
            .append("receiveCounts", getReceiveCounts())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("title", getTitle())
            .append("sort", getSort())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
